From c6f0d283235d984fda385d3a64202233a65fcb7f Mon Sep 17 00:00:00 2001 From: Brian Koropoff Date: Sun, 17 Aug 2014 18:34:50 -0700 Subject: [PATCH] Fix import shadowing errors in tests --- tests/test_cargo_bench.rs | 12 ++++++------ tests/test_cargo_test.rs | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/test_cargo_bench.rs b/tests/test_cargo_bench.rs index cae06099c..85571ae50 100644 --- a/tests/test_cargo_bench.rs +++ b/tests/test_cargo_bench.rs @@ -673,21 +673,21 @@ test!(bench_dylib { [dependencies.bar] path = "bar" "#) - .file("src/lib.rs", " - extern crate bar; + .file("src/lib.rs", r#" + extern crate the_bar = "bar"; extern crate test; - pub fn bar() { bar::baz(); } + pub fn bar() { the_bar::baz(); } #[bench] fn foo(_b: &mut test::Bencher) {} - ") + "#) .file("benches/bench.rs", r#" - extern crate foo; + extern crate the_foo = "foo"; extern crate test; #[bench] - fn foo(_b: &mut test::Bencher) { foo::bar(); } + fn foo(_b: &mut test::Bencher) { the_foo::bar(); } "#) .file("bar/Cargo.toml", r#" [package] diff --git a/tests/test_cargo_test.rs b/tests/test_cargo_test.rs index fad13657b..d78e4342b 100644 --- a/tests/test_cargo_test.rs +++ b/tests/test_cargo_test.rs @@ -652,19 +652,19 @@ test!(test_dylib { [dependencies.bar] path = "bar" "#) - .file("src/lib.rs", " - extern crate bar; + .file("src/lib.rs", r#" + extern crate the_bar = "bar"; - pub fn bar() { bar::baz(); } + pub fn bar() { the_bar::baz(); } #[test] fn foo() { bar(); } - ") + "#) .file("tests/test.rs", r#" - extern crate foo; + extern crate the_foo = "foo"; #[test] - fn foo() { foo::bar(); } + fn foo() { the_foo::bar(); } "#) .file("bar/Cargo.toml", r#" [package] -- 2.30.2